<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var name = '张三'
    var age = 12
    var obj = {
      name: 'lisi',
      print:function(str){
        console.log(this.name);
        console.log(this.age);
        console.log(obj);
        
      }
    }
    var hd = {
      name: '王五',
      age: 30
    }
    obj.print()
    obj.print.call()
    obj.print.apply()
    obj.print.apply(null)
    obj.print.apply(hd, ['2','3'])

  </script>
</body>
</html>